<?php


class Model_Bibliotecas extends Zend_Db_Table_Abstract  {

    protected $_name = 'tbl_administracion_bibliotecas';

    public function GetTblName() {
        return $this->_name;
    }
    
    public function GetBibliotecaById($bibliotecaId) {
        $db = Zend_Db_Table::getDefaultAdapter();
        $select = $this->select();
        $select->from(array($this->_name));
        $select->where('biblioteca_id = "'.$bibliotecaId.'"');
        $select->setIntegrityCheck(false);
        $query = $db->query($select);
        return $query->fetchAll();
    }
    
    public function GetBibliotecas(){
        $db = Zend_Db_Table::getDefaultAdapter();
        $select = $this->select();
        $select->from(array($this->_name));
        $select->setIntegrityCheck(false);
        $query = $db->query($select);
        return $query->fetchAll();
    }

    public function Guardar($rol) {
        
    }
    
}
